package data;

import model.Pharser;

public class Parameter {

	public enum Value {
		Very_Low,
		Low,
		Nominal,
		High,
		Very_High,
		Extra_High,
	}
	
	public double dvalue = -1;
	public int ivalue;
	
	public Parameter(double value){
		dvalue = value;
	}
	
	public Parameter(String key, String svalue) {
		Value value = Value.valueOf(svalue);
		int index;
		switch (value) {
		case Very_Low:
			index = 0;
			break;

		case Low:
			index = 1;
			break;
			
		case Nominal:
			index = 2;
			break;
		
		case High:
			index = 3;
			break;
			
		case Very_High:
			index = 4;
			break;
			
		case Extra_High:
			index = 5;
			break;
			
		default:
			index=-1;
			break;
		}
		dvalue = Pharser.parameterValues.get(key)[index];
	}
}
